<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="box">
    <input type="text" @keyup.myenter="show">
</div>
</body>
<script>
    Vue.config.keyCodes.myenter=13;
    var app = new Vue({
        el: '#box',
        data: {
            msg: 'welcome'
        },
        methods:{
            show: function () {
                alert('show');
            }
        }
    })
</script>
</html>